cap program drop giteedlg

program define giteedlg

version 14

syntax [anything], [url(string) repo(string) REPLACE FORCE]



if (`"`url'"'!="" & `"`repo'"'!=""){

	di _n "note: repository is ignored as url is specified"

}




if (`"`url'"'==""){
	if(`"`repo'"'==""){
		di as error "either url() or repo() should be specified"
		error 198
	}
}


if(`"`url'"'!=""){
	
	di _n(1) "{title:Executing the installpkg command}" _n
	di as txt "gitee install `anything', from(`url') `replace' `force' "   _n 
	gitee install `anything', from(`url')  `replace' `force'        
	
}
else{
	if(`"`anything'"'!="") {
        local pkgname pkgname(`anything')
	}
	
	    di _n(1) "{title:Executing the installpkg command}" _n
		di as txt `"gitee install `repo', `pkgname' `replace' `force' "'   _n 
		gitee install `repo', `pkgname' `replace' `force'   
}



end
